class Test {
    public static void main(String[] args) {
        // 创建CPU对象并设置速度
        CPU cpu = new CPU();
        cpu.setSpeed(2000);

        // 创建HardDisk对象并设置容量
        HardDisk disk = new HardDisk();
        disk.setAmount(100);

        // 创建PC对象并设置CPU和硬盘
        PC pc = new PC();
        pc.setCPU(cpu);
        pc.setHardDisk(disk);

        // 显示CPU速度和硬盘容量
        pc.show();
    }
}
// CPU类
class CPU {
    private int speed;

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }
}
// HardDisk类
class HardDisk {
    private int amount;

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }
}
// PC类
class PC {
    private CPU cpu;
    private HardDisk hardDisk;

    public void setCPU(CPU cpu) {
        this.cpu = cpu;
    }

    public void setHardDisk(HardDisk hardDisk) {
        this.hardDisk = hardDisk;
    }

    public void show() {
        System.out.println("CPU Speed: " + cpu.getSpeed());
        System.out.println("Hard Disk Capacity: " + hardDisk.getAmount());
    }
}